package com.example.demo.common;

import com.example.demo.utils.IdUtils;
import lombok.Data;

@Data
public class ThreadUserPojo {
    private String userId;
    private String token;
    private String reqId;
    private String loginRole;
    private String perms;
    private Boolean topAdmin;

    public ThreadUserPojo() {
        this.reqId = IdUtils.randomUUID();
        this.topAdmin = false;
    }

    public ThreadUserPojo(String userId, String token, String loginRole) {
        this.userId = userId;
        this.token = token;
        this.reqId = IdUtils.randomUUID();
        this.loginRole = loginRole;
        this.topAdmin = false;
    }

    public ThreadUserPojo(String userId, String token, String loginRole, String perms) {
        this.userId = userId;
        this.token = token;
        this.reqId = IdUtils.randomUUID();
        this.loginRole = loginRole;
        this.perms = perms;
        this.topAdmin = false;
    }
}
